package com.example.devopsdemo.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * ClassName: HelloController
 * Package: com.example.devopsdemo.controller
 * Description:
 *
 * @Author 刘轩
 * @Create 2023-09-19 18:52
 * @Version 1.0
 */

@RestController
public class HelloController {

 @GetMapping("/hello")
 public String hello(){
  SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  return "现在北京时间是:\t"+simpleDateFormat.format(new Date());
 }
}